//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#if _MSC_VER > 1000
#pragma once
#endif

#ifndef __ocidl_h__
#define __ocidl_h__

#ifdef __cplusplus
extern "C"{
#endif

/* Forward Declarations */

#ifndef __IEnumConnections_FWD_DEFINED__
#define __IEnumConnections_FWD_DEFINED__
typedef interface IEnumConnections IEnumConnections;
#endif     /* __IEnumConnections_FWD_DEFINED__ */

#ifndef __IConnectionPoint_FWD_DEFINED__
#define __IConnectionPoint_FWD_DEFINED__
typedef interface IConnectionPoint IConnectionPoint;
#endif     /* __IConnectionPoint_FWD_DEFINED__ */

#ifndef __IEnumConnectionPoints_FWD_DEFINED__
#define __IEnumConnectionPoints_FWD_DEFINED__
typedef interface IEnumConnectionPoints IEnumConnectionPoints;
#endif     /* __IEnumConnectionPoints_FWD_DEFINED__ */

#ifndef __IConnectionPointContainer_FWD_DEFINED__
#define __IConnectionPointContainer_FWD_DEFINED__
typedef interface IConnectionPointContainer IConnectionPointContainer;
#endif     /* __IConnectionPointContainer_FWD_DEFINED__ */

#ifndef __IPersistStreamInit_FWD_DEFINED__
#define __IPersistStreamInit_FWD_DEFINED__
typedef interface IPersistStreamInit IPersistStreamInit;
#endif     /* __IPersistStreamInit_FWD_DEFINED__ */

/* header files for imported files */
#include "objidl.h"

/* interface __MIDL_itf_ocidl_0000 */
/* [local] */

#ifndef __IEnumConnections_INTERFACE_DEFINED__
#define __IEnumConnections_INTERFACE_DEFINED__

/* interface IEnumConnections */
/* [unique][uuid][object] */

typedef IEnumConnections *PENUMCONNECTIONS;

typedef struct  tagCONNECTDATA
    {
    IUnknown *pUnk;
    UInt32 dwCookie;
    }    CONNECTDATA;

typedef struct tagCONNECTDATA *PCONNECTDATA;

EXTERN_C const IID IID_IEnumConnections;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("B196B287-BAB4-101A-B69C-00AA00341D07") IEnumConnections : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 cConnections,
            /* [length_is][size_is][out] */ PCONNECTDATA rgcd,
            /* [out] */ UInt32 *pcFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 cConnections) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumConnections **ppEnum) = 0;
};

#else

typedef struct IEnumConnectionsVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumConnections * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumConnections * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumConnections * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumConnections * This,
            /* [in] */ UInt32 cConnections,
            /* [length_is][size_is][out] */ PCONNECTDATA rgcd,
            /* [out] */ UInt32 *pcFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumConnections * This,
            /* [in] */ UInt32 cConnections);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumConnections * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumConnections * This,
            /* [out] */ IEnumConnections **ppEnum);

    } IEnumConnectionsVtbl;

interface IEnumConnections
    {
        CONST_VTBL struct IEnumConnectionsVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumConnections_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumConnections_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumConnections_Release(This)    \
    (This)->v -> Release(This)

#define IEnumConnections_Next(This,cConnections,rgcd,pcFetched)    \
    (This)->v -> Next(This,cConnections,rgcd,pcFetched)

#define IEnumConnections_Skip(This,cConnections)    \
    (This)->v -> Skip(This,cConnections)

#define IEnumConnections_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumConnections_Clone(This,ppEnum)    \
    (This)->v -> Clone(This,ppEnum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumConnections_INTERFACE_DEFINED__ */

#ifndef __IConnectionPoint_INTERFACE_DEFINED__
#define __IConnectionPoint_INTERFACE_DEFINED__

/* interface IConnectionPoint */
/* [unique][uuid][object] */

typedef IConnectionPoint *PCONNECTIONPOINT;

EXTERN_C const IID IID_IConnectionPoint;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("B196B286-BAB4-101A-B69C-00AA00341D07") IConnectionPoint : public IUnknown
{
public:
    virtual CARAPI GetConnectionInterface(
            /* [out] */ IID *pIID) = 0;

    virtual CARAPI GetConnectionPointContainer(
            /* [out] */ IConnectionPointContainer **ppCPC) = 0;

    virtual CARAPI Advise(
            /* [in] */ IUnknown *pUnkSink,
            /* [out] */ UInt32 *pdwCookie) = 0;

    virtual CARAPI Unadvise(
            /* [in] */ UInt32 dwCookie) = 0;

    virtual CARAPI EnumConnections(
            /* [out] */ IEnumConnections **ppEnum) = 0;
};

#else

typedef struct IConnectionPointVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IConnectionPoint * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IConnectionPoint * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IConnectionPoint * This);

        ECode (CARAPICALLTYPE *GetConnectionInterface )(
            IConnectionPoint * This,
            /* [out] */ IID *pIID);

        ECode (CARAPICALLTYPE *GetConnectionPointContainer )(
            IConnectionPoint * This,
            /* [out] */ IConnectionPointContainer **ppCPC);

        ECode (CARAPICALLTYPE *Advise )(
            IConnectionPoint * This,
            /* [in] */ IUnknown *pUnkSink,
            /* [out] */ UInt32 *pdwCookie);

        ECode (CARAPICALLTYPE *Unadvise )(
            IConnectionPoint * This,
            /* [in] */ UInt32 dwCookie);

        ECode (CARAPICALLTYPE *EnumConnections )(
            IConnectionPoint * This,
            /* [out] */ IEnumConnections **ppEnum);

    } IConnectionPointVtbl;

interface IConnectionPoint
    {
        CONST_VTBL struct IConnectionPointVtbl *v;
    };

#ifdef COBJMACROS

#define IConnectionPoint_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IConnectionPoint_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IConnectionPoint_Release(This)    \
    (This)->v -> Release(This)

#define IConnectionPoint_GetConnectionInterface(This,pIID)    \
    (This)->v -> GetConnectionInterface(This,pIID)

#define IConnectionPoint_GetConnectionPointContainer(This,ppCPC)    \
    (This)->v -> GetConnectionPointContainer(This,ppCPC)

#define IConnectionPoint_Advise(This,pUnkSink,pdwCookie)    \
    (This)->v -> Advise(This,pUnkSink,pdwCookie)

#define IConnectionPoint_Unadvise(This,dwCookie)    \
    (This)->v -> Unadvise(This,dwCookie)

#define IConnectionPoint_EnumConnections(This,ppEnum)    \
    (This)->v -> EnumConnections(This,ppEnum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IConnectionPoint_INTERFACE_DEFINED__ */

#ifndef __IEnumConnectionPoints_INTERFACE_DEFINED__
#define __IEnumConnectionPoints_INTERFACE_DEFINED__

/* interface IEnumConnectionPoints */
/* [unique][uuid][object] */

typedef IEnumConnectionPoints *PENUMCONNECTIONPOINTS;

EXTERN_C const IID IID_IEnumConnectionPoints;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("B196B285-BAB4-101A-B69C-00AA00341D07") IEnumConnectionPoints : public IUnknown
{
public:
    virtual /* [local] */ CARAPI Next(
            /* [in] */ UInt32 cConnections,
            /* [length_is][size_is][out] */ PCONNECTIONPOINT *ppCP,
            /* [out] */ UInt32 *pcFetched) = 0;

    virtual CARAPI Skip(
            /* [in] */ UInt32 cConnections) = 0;

    virtual CARAPI Reset( void) = 0;

    virtual CARAPI Clone(
            /* [out] */ IEnumConnectionPoints **ppEnum) = 0;
};

#else

typedef struct IEnumConnectionPointsVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IEnumConnectionPoints * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IEnumConnectionPoints * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IEnumConnectionPoints * This);

        /* [local] */ ECode (CARAPICALLTYPE *Next )(
            IEnumConnectionPoints * This,
            /* [in] */ UInt32 cConnections,
            /* [length_is][size_is][out] */ PCONNECTIONPOINT *ppCP,
            /* [out] */ UInt32 *pcFetched);

        ECode (CARAPICALLTYPE *Skip )(
            IEnumConnectionPoints * This,
            /* [in] */ UInt32 cConnections);

        ECode (CARAPICALLTYPE *Reset )(
            IEnumConnectionPoints * This);

        ECode (CARAPICALLTYPE *Clone )(
            IEnumConnectionPoints * This,
            /* [out] */ IEnumConnectionPoints **ppEnum);

    } IEnumConnectionPointsVtbl;

interface IEnumConnectionPoints
    {
        CONST_VTBL struct IEnumConnectionPointsVtbl *v;
    };

#ifdef COBJMACROS

#define IEnumConnectionPoints_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IEnumConnectionPoints_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IEnumConnectionPoints_Release(This)    \
    (This)->v -> Release(This)

#define IEnumConnectionPoints_Next(This,cConnections,ppCP,pcFetched)    \
    (This)->v -> Next(This,cConnections,ppCP,pcFetched)

#define IEnumConnectionPoints_Skip(This,cConnections)    \
    (This)->v -> Skip(This,cConnections)

#define IEnumConnectionPoints_Reset(This)    \
    (This)->v -> Reset(This)

#define IEnumConnectionPoints_Clone(This,ppEnum)    \
    (This)->v -> Clone(This,ppEnum)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IEnumConnectionPoints_INTERFACE_DEFINED__ */

#ifndef __IConnectionPointContainer_INTERFACE_DEFINED__
#define __IConnectionPointContainer_INTERFACE_DEFINED__

/* interface IConnectionPointContainer */
/* [unique][uuid][object] */

typedef IConnectionPointContainer *PCONNECTIONPOINTCONTAINER;

EXTERN_C const IID IID_IConnectionPointContainer;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("B196B284-BAB4-101A-B69C-00AA00341D07") IConnectionPointContainer : public IUnknown
{
public:
    virtual CARAPI EnumConnectionPoints(
            /* [out] */ IEnumConnectionPoints **ppEnum) = 0;

    virtual CARAPI FindConnectionPoint(
            /* [in] */ RIID riid,
            /* [out] */ IConnectionPoint **ppCP) = 0;
};

#else

typedef struct IConnectionPointContainerVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IConnectionPointContainer * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IConnectionPointContainer * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IConnectionPointContainer * This);

        ECode (CARAPICALLTYPE *EnumConnectionPoints )(
            IConnectionPointContainer * This,
            /* [out] */ IEnumConnectionPoints **ppEnum);

        ECode (CARAPICALLTYPE *FindConnectionPoint )(
            IConnectionPointContainer * This,
            /* [in] */ RIID riid,
            /* [out] */ IConnectionPoint **ppCP);

    } IConnectionPointContainerVtbl;

interface IConnectionPointContainer
    {
        CONST_VTBL struct IConnectionPointContainerVtbl *v;
    };

#ifdef COBJMACROS

#define IConnectionPointContainer_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IConnectionPointContainer_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IConnectionPointContainer_Release(This)    \
    (This)->v -> Release(This)

#define IConnectionPointContainer_EnumConnectionPoints(This,ppEnum)    \
    (This)->v -> EnumConnectionPoints(This,ppEnum)

#define IConnectionPointContainer_FindConnectionPoint(This,riid,ppCP)    \
    (This)->v -> FindConnectionPoint(This,riid,ppCP)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IConnectionPointContainer_INTERFACE_DEFINED__ */

#ifndef __IPersistStreamInit_INTERFACE_DEFINED__
#define __IPersistStreamInit_INTERFACE_DEFINED__

/* interface IPersistStreamInit */
/* [unique][uuid][object] */

typedef IPersistStreamInit *PPERSISTSTREAMINIT;

EXTERN_C const IID IID_IPersistStreamInit;

#if defined(__cplusplus) && !defined(CINTERFACE)

MIDL_INTERFACE("7FD52380-4E07-101B-AE2D-08002B2EC713") IPersistStreamInit : public IPersist
{
public:
    virtual CARAPI IsDirty( void) = 0;

    virtual CARAPI Load(
            /* [in] */ PSTREAM pStm) = 0;

    virtual CARAPI Save(
            /* [in] */ PSTREAM pStm,
            /* [in] */ _ELASTOS Boolean fClearDirty) = 0;

    virtual CARAPI GetSizeMax(
            /* [out] */ ULARGE_INTEGER *pCbSize) = 0;

    virtual CARAPI InitNew( void) = 0;
};

#else

typedef struct IPersistStreamInitVtbl
    {

        ECode (CARAPICALLTYPE *QueryInterface )(
            IPersistStreamInit * This,
            /* [in] */ RIID riid,
            /* [iid_is][out] */ void **ppv);

        UInt32 (CARAPICALLTYPE *AddRef )(
            IPersistStreamInit * This);

        UInt32 (CARAPICALLTYPE *Release )(
            IPersistStreamInit * This);

        ECode (CARAPICALLTYPE *GetClassID )(
            IPersistStreamInit * This,
            /* [out] */ CLSID *pClassID);

        ECode (CARAPICALLTYPE *IsDirty )(
            IPersistStreamInit * This);

        ECode (CARAPICALLTYPE *Load )(
            IPersistStreamInit * This,
            /* [in] */ PSTREAM pStm);

        ECode (CARAPICALLTYPE *Save )(
            IPersistStreamInit * This,
            /* [in] */ PSTREAM pStm,
            /* [in] */ _ELASTOS Boolean fClearDirty);

        ECode (CARAPICALLTYPE *GetSizeMax )(
            IPersistStreamInit * This,
            /* [out] */ ULARGE_INTEGER *pCbSize);

        ECode (CARAPICALLTYPE *InitNew )(
            IPersistStreamInit * This);

    } IPersistStreamInitVtbl;

interface IPersistStreamInit
    {
        CONST_VTBL struct IPersistStreamInitVtbl *v;
    };

#ifdef COBJMACROS

#define IPersistStreamInit_QueryInterface(This,riid,ppv)    \
    (This)->v -> QueryInterface(This,riid,ppv)

#define IPersistStreamInit_AddRef(This)    \
    (This)->v -> AddRef(This)

#define IPersistStreamInit_Release(This)    \
    (This)->v -> Release(This)

#define IPersistStreamInit_GetClassID(This,pClassID)    \
    (This)->v -> GetClassID(This,pClassID)

#define IPersistStreamInit_IsDirty(This)    \
    (This)->v -> IsDirty(This)

#define IPersistStreamInit_Load(This,pStm)    \
    (This)->v -> Load(This,pStm)

#define IPersistStreamInit_Save(This,pStm,fClearDirty)    \
    (This)->v -> Save(This,pStm,fClearDirty)

#define IPersistStreamInit_GetSizeMax(This,pCbSize)    \
    (This)->v -> GetSizeMax(This,pCbSize)

#define IPersistStreamInit_InitNew(This)    \
    (This)->v -> InitNew(This)

#endif /* COBJMACROS */

#endif     /* C style interface */

#endif     /* __IPersistStreamInit_INTERFACE_DEFINED__ */

/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif
